import request from '@/utils/request'
import upload from '@/utils/upload'

//获取文件上传列表详细信息
export function getFileList(data) {
	return request({
		url: '/sys/oss/files',
		method: 'post',
		data:data
	})
}

//根据id获取文件url
export function getFileURL(id) {
	return request({
		url: '/sys/oss/getUrl/'+id,
		method: 'get'
	})
}

// 上传文件
export function uploadFile(tempFiles) {
    return upload({
		url: '/sys/oss/upload',
		filePath:tempFiles[0].path,
		file:tempFiles[0].file
    })
}